---
title: Set worker context
summary: Establishes the current claim context from a worker ID.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Application.Claim
reference_type: embedded
operation_id: OP-CLM-002
trigger: Caller-supplied worker ID, e.g. navigation from a worker-centric screen.
---

# Set worker context

Public method on `ClaimAppManager` that establishes the current context from a worker ID.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CLM-002 |
| **Trigger** | Caller supplies `inWorkerID As Decimal`. |
| **Inputs** | `inWorkerID As Decimal` |
| **Outputs** | None (side effect) |
| **Primary components** | `ClaimAppManager.SetWorkerContext` |
| **Entry point** | `SAIF.Application.Claim\ClaimAppManager.vb` |

## Steps

1. If `inWorkerID > 0`, construct `New ClaimContext(0, inWorkerID)` and call `ChangeContext()`.
   - `ChangeContext()` follows the same downstream sequence as [Set claim context and retrieve](set-claim-context-and-retrieve.md): `OnContextChanged` → `GetClaimData` →, if valid, `OnCheckSecurity` → `OnRetrieve`. `OnCheckSecurity` enforces [BR-CLM-001](../business-rules.md#br-clm-001-conflict-claim-access-restriction) through [BR-CLM-004](../business-rules.md#br-clm-004-hostile-secure-claim-access-restriction).
2. If `inWorkerID <= 0`, no action is taken (no context change, no message set).
   - This path has no explicit error handling*.

## Process flow

```mermaid
flowchart TD
	Start([SetWorkerContext called]) --> Guard{inWorkerID > 0?}
	Guard -->|No| NoOp([No action taken])
	Guard -->|Yes| Change[ChangeContext]
	Change --> Downstream[OnContextChanged → OnCheckSecurity → OnRetrieve]
```

## Failure and edge-case behavior

- `inWorkerID <= 0`: silently no-ops, with no message set*.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Application.Claim\ClaimAppManager.vb`
